﻿using AIVision.Model.EntityModels;
using AIVision.Model.InspectModels;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace AIVision.Model.UIModels
{
	public class SummaryDataModel : BindableBase
	{
		private DateTime startTime = DateTime.Now;
		public DateTime StartTime
		{
			get { return startTime; }
			set { startTime = value; RaisePropertyChanged(); }
		}

		private int okQty;
		public int OkQty
		{
			get { return okQty; }
			set
			{
				okQty = value;
				AllQty = okQty + ngQty;
				RaisePropertyChanged();
			}
		}
		private int ngQty;
		public int NgQty
		{
			get { return ngQty; }
			set
			{
				ngQty = value;
				AllQty = okQty + ngQty;


				RaisePropertyChanged();
			}
		}

		private int allQty;
		public int AllQty
		{
			get { return allQty; }
			set
			{
				allQty = value;
				if (okQty > 0)
					OkRate = (int)Math.Floor((double)okQty / (double)AllQty * 100);
				RaisePropertyChanged();
			}
		}

		private int okRate;
		public int OkRate
		{
			get { return okRate; }
			set { okRate = value; RaisePropertyChanged(); }
		}

		private Dictionary<string, int> defectCount = new Dictionary<string, int>();
		public Dictionary<string, int> DefectCount
		{
			get { return defectCount; }
			set { defectCount = value; RaisePropertyChanged(); }
		}

		private int fangLiaoQty;
		public int FangLiaoQty
		{
			get { return fangLiaoQty; }
			set { fangLiaoQty = value; RaisePropertyChanged(); }
		}

		private int xuanZhuanQty;
		public int XuanZhuanQty
		{
			get { return xuanZhuanQty; }
			set { xuanZhuanQty = value; RaisePropertyChanged(); }
		}


		private int chaHeQty;
		public int ChaHeQty
		{
			get { return chaHeQty; }
			set { chaHeQty = value; RaisePropertyChanged(); }
		}

		private int feiLiaoQty;
		public int FeiLiaoQty
		{
			get { return feiLiaoQty; }
			set { feiLiaoQty = value; RaisePropertyChanged(); }
		}

		private int chuFaPaiZhaoQty;
		public int ChuFaPaiZhaoQty
		{
			get { return chuFaPaiZhaoQty; }
			set { chuFaPaiZhaoQty = value; RaisePropertyChanged(); }
		}

		private int zhiXingPaiZhaoQty;
		public int ZhiXingPaiZhaoQty
		{
			get { return zhiXingPaiZhaoQty; }
			set { zhiXingPaiZhaoQty = value; RaisePropertyChanged(); }
		}

		private int paiZhaoCalcQty;

		public int PaiZhaoCalcQty
		{
			get { return paiZhaoCalcQty; }
			set { paiZhaoCalcQty = value; RaisePropertyChanged(); }
		}

		private string outCode;

		public string OutCode
		{
			get { return outCode; }
			set { outCode = value; RaisePropertyChanged(); }
		}

		private int locationErrQty;
		public int LocationErrQty
		{
			get { return locationErrQty; }
			set { locationErrQty = value; RaisePropertyChanged(); }
		}
        private int pathErrQty;
        public int PathErrQty
        {
            get { return pathErrQty; }
            set { pathErrQty = value; RaisePropertyChanged(); }
        }
        private int photoErrQty;
        public int PhotoErrQty
        {
            get { return photoErrQty; }
            set { photoErrQty = value; RaisePropertyChanged(); }
        }
    }

}
